package coco.mcpspringboot;

import coco.mcpspringboot.mcp.ParamInfoService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class McpSpringBootApplication {

  public static void main(String[] args) {
    SpringApplication.run(McpSpringBootApplication.class, args);
  }

  @Bean
  public ToolCallbackProvider weatherTools(ParamInfoService paramInfoService) {
    return MethodToolCallbackProvider.builder().toolObjects(paramInfoService).build();
  }

}
